package sg.edu.nus.iss.cats.dataaccess.mysql;

import java.sql.*;
import sg.edu.nus.iss.cats.dataaccess.DAOException;

public interface ObjectHandler {

    public String getTableName ();

    public String getKeyParameterConstraint ();

    public void setKeyParameters (PreparedStatement statement, Object obj)
                   throws SQLException, DAOException;

    public Object retrieveObject (ResultSet results)
                   throws SQLException, DAOException;

    public void insertKeys (ResultSet results, Object obj)
                   throws SQLException, DAOException;

    public void updateObject (ResultSet results, Object obj)
                   throws SQLException, DAOException;

    public void completeObjectRetrieve (Object obj) throws DAOException;

    public Object[] getObjectArray (int length);

}